﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Twodi.Aspect.Interfaces;
using Twodi.Interfaces;
using Twodi.Aspect.Implemented;
using Twodi.Behavior.Implemented;
using Twodi.Behavior.Interfaces;
using Microsoft.Xna.Framework;
using Twodi.Implemented.Base;

namespace Twodi.Screen
{
    public class Screen : DrawableComponent, ITransformationAspect, INormalTransformationAspect, IPositionContainerBehavior
    {
        ContainerBehavior Container;

        public Screen(Game game)
            : base(game)
        {
            //Transformation:
            this.TransformationProperties = new NormalTransformationAspect(this);

            //Container:
            this.ContainerProperties = new ContainerAspect();
            Container = new PositionContainerBehavior(this);
        }

        public override void Initialize()
        {
            Container.Initialize();
            base.Initialize();
        }

        public override void Update(GameTime gameTime)
        {
            Container.Update(gameTime);
            base.Update(gameTime);
        }

        public override void Draw(GameTime gameTime)
        {
            Container.Draw(gameTime);
            base.Draw(gameTime);
        }

        public ITransformation TransformationProperties
        {
            get;
            set;
        }

        public IContainer ContainerProperties
        {
            get;
            set;
        }
    }
}
